import * as THREE from 'three'
import {spotLight} from '../light/ambientLight';

// 点光2- 旋转
export const pointLight = new THREE.PointLight('0xccffcc');
pointLight.intensity = 5;
pointLight.decay = 2;
pointLight.distance = 40;
// 环境光的辅助调试
export const spotLightHelper = new THREE.SpotLightHelper( spotLight );
// 点光的辅助调试
export const pointHelper = new THREE.PointLightHelper(pointLight)


// 点光源 蓝色
// export const wp_blue_light = new THREE.PointLight(0xff0000);
export const wp_blue_light = new THREE.PointLight(0x1bd1fc);
wp_blue_light.position.set(10, 22, 10);


// 创建中心顶层
const companyGeometry = new THREE.BoxGeometry(1.5, 0.3, 1.5)
const companyModel = new THREE.MeshPhongMaterial({ 
  color: 0x1e2261,
  wireframe: false 
})
export const wp_top = new THREE.Mesh(companyGeometry, companyModel)
wp_top.receiveShadow = true;
wp_top.position.y = 1.2

// 创建中心顶层蓝色
const geo_1 = new THREE.BoxGeometry(1.2, 0.301, 1.2)
const model_1 = new THREE.MeshPhongMaterial({ 
  color: 0x29bfeb,
  wireframe: false 
})
export const wp_top_center = new THREE.Mesh(geo_1, model_1)
wp_top_center.receiveShadow = true;
wp_top_center.position.y = 1.2


// 创新中心底层
const companyGeometry3 = new THREE.BoxGeometry(1.5, 0.3, 1.5)
const companyModel3 = new THREE.MeshPhongMaterial({ 
  color: 0x1e2261,
  wireframe: false 
})
export const wp_bottom = new THREE.Mesh(companyGeometry3, companyModel3)
wp_bottom.receiveShadow = true;
wp_bottom.position.y = 0.15




const companyGeometry2 = new THREE.BoxGeometry(1.5, 0.75 ,1.5)
// const companyGeometry2 = new THREE.BoxGeometry(2, 1, 2)
const companyModel2 = new THREE.MeshLambertMaterial({ 
  // color: 0x3d79ff,
  color: 0x29bfeb,
  shininess:10,
  // color: 0x27caee,
  transparent : true,
  opacity : 0.8,
  wireframe: false })
export const wp_content_alpha = new THREE.Mesh(companyGeometry2, companyModel2)
wp_content_alpha.receiveShadow = true;
wp_content_alpha.position.y = 0.69



export const groupWorkShop =  new THREE.Group()
// 物体
groupWorkShop.position.set(10,0,10)
groupWorkShop.add(wp_top)
groupWorkShop.add(wp_top_center)
groupWorkShop.add(wp_bottom)
groupWorkShop.add(wp_content_alpha)
// 光源
groupWorkShop.add(wp_blue_light)
// groupWorkShop.add(pointLight);
// groupWorkShop.add(spotLightHelper);
// groupWorkShop.add(pointHelper)
groupWorkShop.name = '车间'
